#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
int x, y;
cin>>x;
if ((x<-2)||(x>2))
    y=2*x;
else
    y=-3*x;
cout<<y;

    return a.exec();
}
